<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>上机3</title>
    <style type="text/css">
        div{
            height: 300px;
            width: 300px;
            border: 1px solid black;
        }
        a{
            display: block;
            height: 100px;
            width: 100px;
            position: relative;
            background-color: pink;
        }
        a:nth-of-type(1){
              left: 0px;
              top: 0px;
          }
        a:nth-of-type(2){
            left: 200px;
            top: -100px;
        }
        a:nth-of-type(3){
            left: 100px;
            top: -100px;
        }
        a:nth-of-type(4){
            left: 0px;
            top: -100px;
        }
        a:nth-of-type(5){
            left: 200px;
            top: -200px;
        }
        a:hover{
            background-color: blue;
        }
    </style>
</head>
<body>
    <div>
        <a href="#">链接1</a>
        <a href="#">链接2</a>
        <a href="#">链接3</a>
        <a href="#">链接4</a>
        <a href="#">链接5</a>
    </div>
</body>
</html>